package com.zyh.service.impl;

import com.zyh.entity.Comment;
import com.zyh.mapper.CommentMapper;
import com.zyh.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService{
    @Autowired
    CommentMapper mapper;

    @Override
    public void deletes(int id) {
        mapper.deletes(id);
    }

    @Override
    public List<Comment> selectBySchoolId(int id) {
        return mapper.selectBySchoolId(id);
    }

    @Override
    public void insert(Comment comment) {
        mapper.insert(comment);
    }

    @Override
    public void delete(int id) {
        mapper.delete(id);
    }

    @Override
    public void update(Comment comment) {
        mapper.update(comment);
    }

    @Override
    public Comment selectById(int id) {
        return mapper.selectById(id);
    }

    @Override
    public List<Comment> selectAll() {
        return mapper.selectAll();
    }
}
